package com.leet.structure;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class FindDisappearedNumbers {
    public List<Integer> findDisappearedNumbers(int[] nums) {
        List<Integer> ans = new ArrayList<>();
        int n = nums.length;
        int[] m = new int[n];
        for(int i = 0; i < n; i++){
            m[nums[i]] += 1;
        }
        for(int i = 0; i < m.length;i++){
            if(m[i] == 0) ans.add(m[i]);
        }
        return ans;
    }
}
